import { encryptMain, decryptMain } from "./app";
const program = require("commander");

process.title = "node-siphan";

program
	.version("0.1.0")
	.usage("<command> [options]")
	.parse(process.argv);

program
	.command("input <fileName>")
	.description("select a file to be encrypted by siphan")
	.action(fileName => {
		encryptMain(fileName);
	});

program
	.command("output <fileName> [otherFiles...]")
	.description("select a file to be decrypted by siphan")
	.action((fileName, otherFiles) => {
		decryptMain(otherFiles[0], otherFiles[1], fileName);
	});

program.parse(process.argv);
